package com.claims

import com.claims.code.State

class Person {

  Long id
  String name
  String nric
  Date dateOfBirth
  String address
  String address2
  String city
  String postcode
  State state

  /**
   * mapping
   */
  static mapping = {
    tablePerHierarchy false
  }

  /**
   * constraints
   */
  static constraints = {
    name()
    nric()
    dateOfBirth()
    address()
    address2()
    city()
    postcode()
    state()
  }

  public String getName(){
    if (name != null)
      return name.toUpperCase();
    else
      return null;
  }
}
